3.2.4 \(\int \frac {-a+b \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx\) [104]

Optimal. Leaf size=102 \[ -\frac {(i a-b) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )}{\sqrt {a-i b} d}+\frac {(i a+b) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{\sqrt {a+i b} d} \]

[Out]

-(I*a-b)*arctanh((a+b*cot(d*x+c))^(1/2)/(a-I*b)^(1/2))/d/(a-I*b)^(1/2)+(I*a+b)*arctanh((a+b*cot(d*x+c))^(1/2)/
(a+I*b)^(1/2))/d/(a+I*b)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.12, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {3620, 3618, 65, 214} \begin {gather*} \frac {(b+i a) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{d \sqrt {a+i b}}-\frac {(-b+i a) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )}{d \sqrt {a-i b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-a + b*Cot[c + d*x])/Sqrt[a + b*Cot[c + d*x]],x]

[Out]

-(((I*a - b)*ArcTanh[Sqrt[a + b*Cot[c + d*x]]/Sqrt[a - I*b]])/(Sqrt[a - I*b]*d)) + ((I*a + b)*ArcTanh[Sqrt[a +
 b*Cot[c + d*x]]/Sqrt[a + I*b]])/(Sqrt[a + I*b]*d)

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 3618

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c*(
d/f), Subst[Int[(a + (b/d)*x)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] &&
NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]

Rule 3620

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c
 + I*d)/2, Int[(a + b*Tan[e + f*x])^m*(1 - I*Tan[e + f*x]), x], x] + Dist[(c - I*d)/2, Int[(a + b*Tan[e + f*x]
)^m*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0]
&& NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]

Rubi steps

\begin {align*} \int \frac {-a+b \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx &=\frac {1}{2} (-a-i b) \int \frac {1+i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx+\frac {1}{2} (-a+i b) \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx\\ &=\frac {(i a-b) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a-i b x}} \, dx,x,i \cot (c+d x)\right )}{2 d}-\frac {(i a+b) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a+i b x}} \, dx,x,-i \cot (c+d x)\right )}{2 d}\\ &=-\frac {(a-i b) \text {Subst}\left (\int \frac {1}{-1+\frac {i a}{b}-\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \cot (c+d x)}\right )}{b d}-\frac {(a+i b) \text {Subst}\left (\int \frac {1}{-1-\frac {i a}{b}+\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \cot (c+d x)}\right )}{b d}\\ &=-\frac {(i a-b) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )}{\sqrt {a-i b} d}+\frac {(i a+b) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{\sqrt {a+i b} d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.48, size = 156, normalized size = 1.53 \begin {gather*} \frac {\left (\sqrt {a+i b} (-i a+b) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )+\sqrt {a-i b} (i a+b) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )\right ) (a-b \cot (c+d x)) \sin (c+d x)}{\sqrt {a-i b} \sqrt {a+i b} d (-b \cos (c+d x)+a \sin (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-a + b*Cot[c + d*x])/Sqrt[a + b*Cot[c + d*x]],x]

[Out]

((Sqrt[a + I*b]*((-I)*a + b)*ArcTanh[Sqrt[a + b*Cot[c + d*x]]/Sqrt[a - I*b]] + Sqrt[a - I*b]*(I*a + b)*ArcTanh
[Sqrt[a + b*Cot[c + d*x]]/Sqrt[a + I*b]])*(a - b*Cot[c + d*x])*Sin[c + d*x])/(Sqrt[a - I*b]*Sqrt[a + I*b]*d*(-
(b*Cos[c + d*x]) + a*Sin[c + d*x]))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(782\) vs. \(2(84)=168\).
time = 0.66, size = 783, normalized size = 7.68

method result size
derivativedivides \(-\frac {2 b \left (\frac {\frac {\left (-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a^{3}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a \,b^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{4}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{4}\right ) \ln \left (b \cot \left (d x +c \right )+a +\sqrt {a +b \cot \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (-4 a^{3} b^{2}-4 a \,b^{4}-\frac {\left (-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a^{3}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a \,b^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{4}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{4}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \cot \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 b^{2} \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}+\frac {-\frac {\left (-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a^{3}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a \,b^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{4}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{4}\right ) \ln \left (\sqrt {a +b \cot \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \cot \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (4 a^{3} b^{2}+4 a \,b^{4}+\frac {\left (-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a^{3}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a \,b^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{4}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{4}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \cot \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 b^{2} \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}\right )}{d}\) \(783\)
default \(-\frac {2 b \left (\frac {\frac {\left (-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a^{3}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a \,b^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{4}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{4}\right ) \ln \left (b \cot \left (d x +c \right )+a +\sqrt {a +b \cot \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (-4 a^{3} b^{2}-4 a \,b^{4}-\frac {\left (-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a^{3}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a \,b^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{4}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{4}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \cot \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 b^{2} \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}+\frac {-\frac {\left (-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a^{3}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a \,b^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{4}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{4}\right ) \ln \left (\sqrt {a +b \cot \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \cot \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (4 a^{3} b^{2}+4 a \,b^{4}+\frac {\left (-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a^{3}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, a \,b^{2}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{4}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{4}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \cot \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{4 b^{2} \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}\right )}{d}\) \(783\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-a+b*cot(d*x+c))/(a+b*cot(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-2/d*b*(1/4/b^2/(a^2+b^2)^(3/2)*(1/2*(-(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a^3-(2*(a^2+b^2)^(1/2)+2*
a)^(1/2)*(a^2+b^2)^(1/2)*a*b^2+(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^4-(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*b^4)*ln(b*cot(d
*x+c)+a+(a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))+2*(-4*a^3*b^2-4*a*b^4-1/2*(-(2*(
a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a^3-(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a*b^2+(2*(a^2+b^2)
^(1/2)+2*a)^(1/2)*a^4-(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*b^4)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a
)^(1/2)*arctan((2*(a+b*cot(d*x+c))^(1/2)+(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)))+1/4/b^
2/(a^2+b^2)^(3/2)*(-1/2*(-(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a^3-(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2
+b^2)^(1/2)*a*b^2+(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^4-(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*b^4)*ln((a+b*cot(d*x+c))^(1/
2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)-b*cot(d*x+c)-a-(a^2+b^2)^(1/2))+2*(4*a^3*b^2+4*a*b^4+1/2*(-(2*(a^2+b^2)^(1/2)
+2*a)^(1/2)*(a^2+b^2)^(1/2)*a^3-(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a*b^2+(2*(a^2+b^2)^(1/2)+2*a)^(1
/2)*a^4-(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*b^4)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan
(((2*(a^2+b^2)^(1/2)+2*a)^(1/2)-2*(a+b*cot(d*x+c))^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a+b*cot(d*x+c))/(a+b*cot(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate((b*cot(d*x + c) - a)/sqrt(b*cot(d*x + c) + a), x)

________________________________________________________________________________________

Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a+b*cot(d*x+c))/(a+b*cot(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \frac {a}{\sqrt {a + b \cot {\left (c + d x \right )}}}\, dx - \int \left (- \frac {b \cot {\left (c + d x \right )}}{\sqrt {a + b \cot {\left (c + d x \right )}}}\right )\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a+b*cot(d*x+c))/(a+b*cot(d*x+c))**(1/2),x)

[Out]

-Integral(a/sqrt(a + b*cot(c + d*x)), x) - Integral(-b*cot(c + d*x)/sqrt(a + b*cot(c + d*x)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a+b*cot(d*x+c))/(a+b*cot(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate((b*cot(d*x + c) - a)/sqrt(b*cot(d*x + c) + a), x)

________________________________________________________________________________________

Mupad [B]
time = 2.20, size = 2731, normalized size = 26.77 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(a - b*cot(c + d*x))/(a + b*cot(c + d*x))^(1/2),x)

[Out]

2*atanh((32*a^4*b^2*d^2*(- (-16*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (a^3*d^2)/(4*(a^2*d^4 + b^2*d^4)
))^(1/2)*(a + b*cot(c + d*x))^(1/2))/((16*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) + (16*a^6*b^3*d^5)/(a^2*d^4 + b^2*d
^4) + (4*a^3*b^3*d^4*(-16*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) + (4*a*b^5*d^4*(-16*a^4*b^2*d^4)^(1/2))/(a^2
*d^5 + b^2*d^5)) - (32*a^2*b^2*(- (-16*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (a^3*d^2)/(4*(a^2*d^4 + b
^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2))/((16*a^4*b^3*d^3)/(a^2*d^4 + b^2*d^4) + (4*a*b^3*d^2*(-16*a^4*b^2*
d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) + (8*a*b^2*(- (-16*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (a^3*d^2)/(4
*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2)*(-16*a^4*b^2*d^4)^(1/2))/((16*a^4*b^5*d^5)/(a^2*d^4 +
b^2*d^4) + (16*a^6*b^3*d^5)/(a^2*d^4 + b^2*d^4) + (4*a^3*b^3*d^4*(-16*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)
+ (4*a*b^5*d^4*(-16*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)))*(- (-16*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^
4)) - (a^3*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2) - 2*atanh((32*a^2*b^2*((-16*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b
^2*d^4)) - (a^3*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2))/((16*a^4*b^3*d^3)/(a^2*d^4 + b
^2*d^4) - (4*a*b^3*d^2*(-16*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) - (32*a^4*b^2*d^2*((-16*a^4*b^2*d^4)^(1/2
)/(16*(a^2*d^4 + b^2*d^4)) - (a^3*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2))/((16*a^4*b^5
*d^5)/(a^2*d^4 + b^2*d^4) + (16*a^6*b^3*d^5)/(a^2*d^4 + b^2*d^4) - (4*a^3*b^3*d^4*(-16*a^4*b^2*d^4)^(1/2))/(a^
2*d^5 + b^2*d^5) - (4*a*b^5*d^4*(-16*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) + (8*a*b^2*((-16*a^4*b^2*d^4)^(1
/2)/(16*(a^2*d^4 + b^2*d^4)) - (a^3*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2)*(-16*a^4*b^
2*d^4)^(1/2))/((16*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) + (16*a^6*b^3*d^5)/(a^2*d^4 + b^2*d^4) - (4*a^3*b^3*d^4*(-
16*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) - (4*a*b^5*d^4*(-16*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)))*((-16
*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (a^3*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2) + 2*atanh((32*b^4*((a*
b^2*d^2)/(4*(a^2*d^4 + b^2*d^4)) - (-16*b^6*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1
/2))/((16*b^5)/d - (16*a^2*b^5*d^3)/(a^2*d^4 + b^2*d^4) + (4*a*b^3*d^2*(-16*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5
)) + (8*a*b^2*((a*b^2*d^2)/(4*(a^2*d^4 + b^2*d^4)) - (-16*b^6*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)))^(1/2)*(a +
b*cot(c + d*x))^(1/2)*(-16*b^6*d^4)^(1/2))/(16*b^7*d + 16*a^2*b^5*d - (16*a^2*b^7*d^5)/(a^2*d^4 + b^2*d^4) - (
16*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) + (4*a*b^5*d^4*(-16*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) + (4*a^3*b^3*d^4*(
-16*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) - (32*a^2*b^4*d^2*((a*b^2*d^2)/(4*(a^2*d^4 + b^2*d^4)) - (-16*b^6*d^4
)^(1/2)/(16*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2))/(16*b^7*d + 16*a^2*b^5*d - (16*a^2*b^7*d^5
)/(a^2*d^4 + b^2*d^4) - (16*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) + (4*a*b^5*d^4*(-16*b^6*d^4)^(1/2))/(a^2*d^5 + b^
2*d^5) + (4*a^3*b^3*d^4*(-16*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)))*((a*b^2*d^2)/(4*(a^2*d^4 + b^2*d^4)) - (-16
*b^6*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)))^(1/2) + 2*atanh((8*a*b^2*((-16*b^6*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4
)) + (a*b^2*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2)*(-16*b^6*d^4)^(1/2))/((16*a^2*b^7*d
^5)/(a^2*d^4 + b^2*d^4) - 16*a^2*b^5*d - 16*b^7*d + (16*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) + (4*a*b^5*d^4*(-16*b
^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) + (4*a^3*b^3*d^4*(-16*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) - (32*b^4*((-16*
b^6*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) + (a*b^2*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2
))/((16*a^2*b^5*d^3)/(a^2*d^4 + b^2*d^4) - (16*b^5)/d + (4*a*b^3*d^2*(-16*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5))
 + (32*a^2*b^4*d^2*((-16*b^6*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) + (a*b^2*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2)*
(a + b*cot(c + d*x))^(1/2))/((16*a^2*b^7*d^5)/(a^2*d^4 + b^2*d^4) - 16*a^2*b^5*d - 16*b^7*d + (16*a^4*b^5*d^5)
/(a^2*d^4 + b^2*d^4) + (4*a*b^5*d^4*(-16*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) + (4*a^3*b^3*d^4*(-16*b^6*d^4)^(1
/2))/(a^2*d^5 + b^2*d^5)))*((-16*b^6*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) + (a*b^2*d^2)/(4*(a^2*d^4 + b^2*d^4))
)^(1/2)

________________________________________________________________________________________